{include file="common/top" /}
 <link  type="text/css" href="__static/ossupload/style.css"/>
<style>
html{
	background: #ffffff;
}
</style>
<form class="layui-form " action="" style="background: #fff;">
	
	<div class="layui-form-item">
		<label class="layui-form-label">凭证上传：</label>
		<div class="layui-col-xs8">
			<div id="container">
				<a id="selectfiles" href="javascript:void(0);" class='btn layui-btn'>选择文件</a>
				<a id="postfiles" href="javascript:void(0);" class='btn layui-btn'>开始上传</a>
			</div>
			<pre id="console"></pre>
			<p>&nbsp;</p>
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label"></label>
		<div class="layui-col-xs10">
			<h4>您所选择的文件列表：</h4>
			<div id="ossfile">你的浏览器不支持flash,Silverlight或者HTML5！</div>
			<br/>
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label"></label>
		<div class="layui-col-xs10" >
			<div id="img">
				<span style="margin-left: 2%;"> <img style="width:10%" src="{$rs.returned_money_url}"></span>
			</div>
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">备注：</label>
		<div class="layui-col-xs9">
			<textarea name="note" autocomplete="off" placeholder="请输入详细备注" class="layui-textarea">{$rs.note}</textarea>
		</div>
	</div>
	<hr />
	<div class="layui-form-item">
		<div class="layui-input-block">
			<input type="hidden" id='image'  name="returned_money_url" value="{$rs.returned_money_url}">
			<input type="hidden"  name="id" value="{$rs.id}">
			<button class="layui-btn"  lay-submit="" lay-filter="demo1">提交</button>
		</div>
	</div>
	
</form>
{include file="common/footer" /}
<script type="text/javascript" src="__static/ossupload/lib/crypto1/crypto/crypto.js"></script>
<script type="text/javascript" src="__static/ossupload/lib/crypto1/hmac/hmac.js"></script>
<script type="text/javascript" src="__static/ossupload/lib/crypto1/sha1/sha1.js"></script>
<script type="text/javascript" src="__static/ossupload/lib/base64.js"></script>
<script type="text/javascript" src="__static/ossupload/lib/plupload-2.1.2/js/plupload.full.min.js"></script>
<script type="text/javascript" src="__static/ossupload/upload.js"></script>
<script>
	
	layui.use(['form', 'layedit', 'laydate'], function(){
		  var form = layui.form ,layer = layui.layer,laydate = layui.laydate;
		  //监听提交
		  form.on('submit(demo1)', function(data){
			var articleFrom = data.field;
			layer.load(1, { shade : [ 0.5, '#676a6c' ] }); 
			$.post("{:url('return_money_save')}?t=json",articleFrom,function(data){
				layer.closeAll();
				if (data['code'] == 1) { 
					var index1 = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
					parent.layer.close(index1); //再执行关闭 
					//父页面数据 ，重新加载
					parent.get_load(data['msg']);

				} else {
					layer.msg(data['msg'], { icon : 5 });
				}
			});
			
			return false;
		  });
		  
	});
	
</script>
